﻿
Namespace Validation

    Public Class DomainRuleEventArgs
        Inherits RuleEventArgs

#Region " Declarations "

        Private _enumRequiredEntry As RequiredEntry = RequiredEntry.No
        Private _strData As String()

#End Region

#Region " Properties "

        Public Property Data() As String()
            Get
                Return _strData
            End Get
            Set(ByVal Value As String())
                _strData = Value
            End Set
        End Property

        Public Property RequiredEntry() As RequiredEntry
            Get
                Return _enumRequiredEntry
            End Get
            Set(ByVal Value As RequiredEntry)
                _enumRequiredEntry = Value
            End Set
        End Property

#End Region

#Region " Constructor "

        Public Sub New(ByVal e As DomainValidatorAttribute, ByVal strPropertyName As String)
            MyBase.New(strPropertyName, e.PropertyFriendlyName, e.RuleSet, e.CustomMessage)
            _strData = e.Data
            _enumRequiredEntry = e.RequiredEntry
        End Sub

        Public Sub New(ByVal enumRequiredEntry As RequiredEntry, ByVal strCustomMessage As String, ByVal strPropertyFriendlyName As String, ByVal strPropertyName As String, ByVal strRuleSet As String, ByVal ParamArray strData As String())
            MyBase.New(strPropertyName, strPropertyFriendlyName, strRuleSet, strCustomMessage)
            _strData = strData
            _enumRequiredEntry = enumRequiredEntry
        End Sub

#End Region

    End Class

End Namespace
